From: Shengjing Zhu Date: Fri, 2 Aug 2024 09:13:32 +0000 (+0800) Subject: Disable build in setup.py X-Git-Tag: archive/raspbian/1.1.9+ds1-4+rpi1^2^2~22 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=fc11b4857494309f3468236397aa90c06c1025ac;p=opencc.git Disable build in setup.py --- diff --git a/debian/patches/0002-data-Explicitly-use-python3.patch b/debian/patches/0002-data-Explicitly-use-python3.patch new file mode 100644 index 0000000..2e4d3ac --- /dev/null +++ b/debian/patches/0002-data-Explicitly-use-python3.patch @@ -0,0 +1,65 @@ +From: Boyuan Yang +Date: Thu, 25 Jun 2020 20:32:44 -0400 +Subject: data/: Explicitly use python3 + +Before "python" is default to python3, this patch should be kept. + +Last-Update: 2020-06-25 +--- + data/scripts/find_target.py | 2 +- + data/scripts/merge.py | 2 +- + data/scripts/reverse.py | 2 +- + data/scripts/sort.py | 2 +- + data/scripts/sort_all.py | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/data/scripts/find_target.py b/data/scripts/find_target.py +index 4244949..7b2b477 100755 +--- a/data/scripts/find_target.py ++++ b/data/scripts/find_target.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + import sys +diff --git a/data/scripts/merge.py b/data/scripts/merge.py +index 680c90e..01fcf51 100755 +--- a/data/scripts/merge.py ++++ b/data/scripts/merge.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + import codecs +diff --git a/data/scripts/reverse.py b/data/scripts/reverse.py +index 746f887..a87ae46 100755 +--- a/data/scripts/reverse.py ++++ b/data/scripts/reverse.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + import sys +diff --git a/data/scripts/sort.py b/data/scripts/sort.py +index f7d4dc5..6ad6e8c 100755 +--- a/data/scripts/sort.py ++++ b/data/scripts/sort.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + import sys + +diff --git a/data/scripts/sort_all.py b/data/scripts/sort_all.py +index bd57ae7..c742413 100755 +--- a/data/scripts/sort_all.py ++++ b/data/scripts/sort_all.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + import glob + import sys diff --git a/debian/patches/0003-data-Explicitly-use-python3.patch b/debian/patches/0003-data-Explicitly-use-python3.patch deleted file mode 100644 index 2e4d3ac..0000000 --- a/debian/patches/0003-data-Explicitly-use-python3.patch +++ /dev/null @@ -1,65 +0,0 @@ -From: Boyuan Yang -Date: Thu, 25 Jun 2020 20:32:44 -0400 -Subject: data/: Explicitly use python3 - -Before "python" is default to python3, this patch should be kept. - -Last-Update: 2020-06-25 ---- - data/scripts/find_target.py | 2 +- - data/scripts/merge.py | 2 +- - data/scripts/reverse.py | 2 +- - data/scripts/sort.py | 2 +- - data/scripts/sort_all.py | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/data/scripts/find_target.py b/data/scripts/find_target.py -index 4244949..7b2b477 100755 ---- a/data/scripts/find_target.py -+++ b/data/scripts/find_target.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # -*- coding: utf-8 -*- - - import sys -diff --git a/data/scripts/merge.py b/data/scripts/merge.py -index 680c90e..01fcf51 100755 ---- a/data/scripts/merge.py -+++ b/data/scripts/merge.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # -*- coding: utf-8 -*- - - import codecs -diff --git a/data/scripts/reverse.py b/data/scripts/reverse.py -index 746f887..a87ae46 100755 ---- a/data/scripts/reverse.py -+++ b/data/scripts/reverse.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # -*- coding: utf-8 -*- - - import sys -diff --git a/data/scripts/sort.py b/data/scripts/sort.py -index f7d4dc5..6ad6e8c 100755 ---- a/data/scripts/sort.py -+++ b/data/scripts/sort.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # -*- coding: utf-8 -*- - import sys - -diff --git a/data/scripts/sort_all.py b/data/scripts/sort_all.py -index bd57ae7..c742413 100755 ---- a/data/scripts/sort_all.py -+++ b/data/scripts/sort_all.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # -*- coding: utf-8 -*- - import glob - import sys diff --git a/debian/patches/0003-no-remote-images-when-reading-docs-on-disk.patch b/debian/patches/0003-no-remote-images-when-reading-docs-on-disk.patch new file mode 100644 index 0000000..8a4c445 --- /dev/null +++ b/debian/patches/0003-no-remote-images-when-reading-docs-on-disk.patch @@ -0,0 +1,29 @@ +From: Gunnar Hjalmarsson +Date: Sun, 28 Jul 2024 19:42:55 -0400 +Subject: Don't fetch remote images when reading docs on disk + +This fixes a privacy breach previously reported as Lintian warnings + +Forwarded: not-needed +Last-Update: 2024-07-28 +--- + README.md | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/README.md b/README.md +index e4edffb..cc22afd 100644 +--- a/README.md ++++ b/README.md +@@ -1,12 +1,5 @@ + # Open Chinese Convert 開放中文轉換 + +-[![CMake](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml) +-[![Bazel](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml) +-[![MSVC](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml) +-[![Node.js CI](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml) +-[![Python CI](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml) +-[![AppVeyor](https://img.shields.io/appveyor/ci/Carbo/OpenCC.svg)](https://ci.appveyor.com/project/Carbo/OpenCC) +- + ## Introduction 介紹 + + ![OpenCC](https://opencc.byvoid.com/img/opencc.png) diff --git a/debian/patches/0004-Use-system-googletest.patch b/debian/patches/0004-Use-system-googletest.patch new file mode 100644 index 0000000..2309815 --- /dev/null +++ b/debian/patches/0004-Use-system-googletest.patch @@ -0,0 +1,23 @@ +From: Shengjing Zhu +Date: Sun, 28 Jul 2024 19:44:27 -0400 +Subject: Use system googletest + +Forwarded: not-needed +Last-Update: 2024-07-28 +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6db5fa1..fcdedeb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -231,6 +231,8 @@ add_subdirectory(test) + if (ENABLE_GTEST) + if(NOT USE_SYSTEM_GTEST) + add_subdirectory(deps/googletest-1.15.0) ++ else() ++ add_subdirectory(/usr/src/googletest/googletest ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL) + endif() + enable_testing() + endif() diff --git a/debian/patches/0004-no-remote-images-when-reading-docs-on-disk.patch b/debian/patches/0004-no-remote-images-when-reading-docs-on-disk.patch deleted file mode 100644 index 8a4c445..0000000 --- a/debian/patches/0004-no-remote-images-when-reading-docs-on-disk.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Gunnar Hjalmarsson -Date: Sun, 28 Jul 2024 19:42:55 -0400 -Subject: Don't fetch remote images when reading docs on disk - -This fixes a privacy breach previously reported as Lintian warnings - -Forwarded: not-needed -Last-Update: 2024-07-28 ---- - README.md | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/README.md b/README.md -index e4edffb..cc22afd 100644 ---- a/README.md -+++ b/README.md -@@ -1,12 +1,5 @@ - # Open Chinese Convert 開放中文轉換 - --[![CMake](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml) --[![Bazel](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml) --[![MSVC](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml) --[![Node.js CI](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml) --[![Python CI](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml) --[![AppVeyor](https://img.shields.io/appveyor/ci/Carbo/OpenCC.svg)](https://ci.appveyor.com/project/Carbo/OpenCC) -- - ## Introduction 介紹 - - ![OpenCC](https://opencc.byvoid.com/img/opencc.png) diff --git a/debian/patches/0005-Disable-build-in-setup.py.patch b/debian/patches/0005-Disable-build-in-setup.py.patch new file mode 100644 index 0000000..e08a956 --- /dev/null +++ b/debian/patches/0005-Disable-build-in-setup.py.patch @@ -0,0 +1,20 @@ +From: Shengjing Zhu +Date: Fri, 2 Aug 2024 17:11:08 +0800 +Subject: Disable build in setup.py + +--- + setup.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.py b/setup.py +index a4bc500..f32590e 100644 +--- a/setup.py ++++ b/setup.py +@@ -62,6 +62,7 @@ def get_long_description(): + + + def build_libopencc(output_path): ++ return + print('building libopencc into %s' % _build_dir) + + is_windows = sys.platform == 'win32' diff --git a/debian/patches/0005-Use-system-googletest.patch b/debian/patches/0005-Use-system-googletest.patch deleted file mode 100644 index 2309815..0000000 --- a/debian/patches/0005-Use-system-googletest.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Shengjing Zhu -Date: Sun, 28 Jul 2024 19:44:27 -0400 -Subject: Use system googletest - -Forwarded: not-needed -Last-Update: 2024-07-28 ---- - CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6db5fa1..fcdedeb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -231,6 +231,8 @@ add_subdirectory(test) - if (ENABLE_GTEST) - if(NOT USE_SYSTEM_GTEST) - add_subdirectory(deps/googletest-1.15.0) -+ else() -+ add_subdirectory(/usr/src/googletest/googletest ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL) - endif() - enable_testing() - endif() diff --git a/debian/patches/series b/debian/patches/series index 481132a..b62fc18 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,5 @@ 0001-use-cmake-install-libdir.patch -0003-data-Explicitly-use-python3.patch -0004-no-remote-images-when-reading-docs-on-disk.patch -0005-Use-system-googletest.patch +0002-data-Explicitly-use-python3.patch +0003-no-remote-images-when-reading-docs-on-disk.patch +0004-Use-system-googletest.patch +0005-Disable-build-in-setup.py.patch